package com.biz.feign.config;

import com.biz.feign.interceptor.*;
import org.springframework.context.annotation.*;

/**
 * @Description
 *    Feign配置类
 * @Author liuxi
 * @Date 2024/5/19
 **/
public class FeignConfig {

    /**
     * 创建Feign请求拦截器，在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
     */
    @Bean
    public FeignAuthRequestInterceptor authRequestInterceptor() {
        return new FeignAuthRequestInterceptor();
    }

}
